<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div>
    <!--<h2>Create Project</h2>-->
    <form action="/JudiBlog/projectmanage" method="post" name="addProject">
        <div class="create_project">
            <div class="project_name"><label>Project Name</label><input type="text" class="input_name" name="projectName"/></div>
            <div class="start_day"><label>Start Day</label>
                <div class="time">
                    <select class="day" name="day" >
                        <option value="0" selected>Day</option>
                        <c:forEach var="i" begin="1" end="31" step="1">
                            <option value="${i}">${i}</option>
                        </c:forEach>
                    </select>
                    &nbsp;
                    <select class="month" name="month" >
                        <option value="0" selected>Month</option>
                        <c:forEach var="i" begin="1" end="12" step="1">
                            <option value="${i}">${i}</option>
                        </c:forEach>
                    </select>
                    &nbsp;
                    <select class="year" name="year">
                        <option value="0" selected>Year</option>
                        <%@page import="java.util.Calendar"%>
                        <%@page import="java.util.GregorianCalendar"%>
                        <%
                            GregorianCalendar cal = new GregorianCalendar();
                            int year = cal.get(Calendar.YEAR);
                            for (int i = year; i >= year - 110; i--) {
                                out.print("<option value='" + i + "'>" + i + "</option>");
                            }
                        %>
                    </select>
                </div>
            </div>
            <div class="duration_time"><label>Duration Time</label>
                <input type="text" class="input_time" name="duration"/>
                <select class="duration" name="dtype">
                    <option value="day">Day</option>
                    <option value="week">Week</option>
                    <option value="month">Month</option>
                </select>
            </div>        
            <div class="project_type"><label>Project Type</label>
                <select name="projectType">
                    <c:forEach items="${typeList}" var="List">
                        <option value="${List.getTypeName()}">${List.getTypeName()}</option>
                    </c:forEach>
                </select>
            </div>
            <div class="description"><label>Description</label>
                <div><textarea name="description"></textarea></div>
            </div>
            <div class="submit">
                <input type="submit" value="CreateProject" name="submit" class="submit_project"/>
            </div>
        </div>
    </form>
</div>